<?php
registerTable("permission_user", new table_permission_user());

class table_permission_user extends Database
{

    public function __construct()
    {
        parent::__construct("permission_user");
    }

    public function create($userid, $groups)
    {
        return parent::insert(array(
            "uid" => $userid,
            "groups" => json_encode($groups)
        ), array(
            "uid"
        ));
    }
}
?>